/**
 * Created by Administrator on 2016/10/16.
 */
angular.module('resetPassword.service', []).service('$resetPasswordService', ['$http', function ($http) {
    /**
     * 发送邮件
     */
    this.sendEmail = function (params, success, fail) {
        $http({
            method: 'POST',
            url: '/resetPassword/email/',
            data: params
        }).then(success, fail);
    };
    /**
     * 通过邮箱重置密码
     */
    this.updatePasswordByEmail = function (params, success, fail) {
        $http({
            method: 'POST',
            url: '/resetPassword/',
            data: params
        }).then(success, fail);
    }

}]);